/*
 * $Author: cbeams $
 * $Date: 2007-06-04 19:47:27 +0000 (Mon, 04 Jun 2007) $
 * $Rev: 26 $
 */
package com.db4o.eclipse.plugin.views;

import com.db4o.eclipse.plugin.Db4oPlugin;

import org.eclipse.jface.resource.ImageDescriptor;

import org.eclipse.swt.graphics.Image;


enum Db4oIcons {
    CLASS("icons/class_obj.gif"), DATABASE("icons/database.gif"), INSTANCE("icons/bean.png"),
    OPEN_DB_FILE("icons/openFile.gif"), FIELD("icons/field_public_obj.gif"),
    INTERFACE("icons/int_obj.gif"), UNKNOWN("icons/linkto_help.gif");

    private final String path;

    private Db4oIcons(String path) {
        this.path = path;
    }

    public ImageDescriptor getImageDescriptor() {
        return Db4oPlugin.getImageDescriptor(path);
    }

    public Image getImage() {
        return getImageDescriptor().createImage();
    }
}
